package compendiumAid.application.exportElements
{
	import compendiumAid.domain.model.ApplicationModel;
	
	import org.spicefactory.lib.task.SequentialTaskGroup;
	import org.spicefactory.lib.task.TaskGroup;

	public class ExportElementsCommand
	{
		[Inject]
		public var model:ApplicationModel; 
		
		[Command]
		public function export(event:ExportElementsEvent):void
		{
			var group:TaskGroup = new SequentialTaskGroup("ExportElements");
			group.ignoreChildErrors = true;
			group.addTask(new ExportElementsTask(event.elementRows, model));
			
			group.start();
		}
	}
}